﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;

namespace TruongVu.Data
{
    public class Singleton
    {
        private static truongvuDataContext _dataContext;
        /// <summary>
        /// 
        /// </summary>
        public static truongvuDataContext DataContext
        {
            get
            {
                if (_dataContext == null)
                    _dataContext = new truongvuDataContext(ConfigurationManager.ConnectionStrings["truongvu_ConStr"].ConnectionString);
                return _dataContext;
            }
        }
    }
}
